package com.zecan.blog.dao;

import com.zecan.blog.entity.BlogUser;
import com.zecan.blog.entity.UserCenterBlogInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName UserMapper
 * @Description
 * @date 2022/10/29 18:12
 * @Version 1.0
 * User数据层接口
 */

public interface UserMapper {


    BlogUser findUserByUsername(String username);

    BlogUser findUserByUserId(Integer userId);

    Integer findUserAuthenticationInfoById(Long userId);

    String findUserEmailById(Long userId);

    String findUserByEmail(String email);

    Integer insertUser(@Param("user") BlogUser blogUser);

    Integer updateUserInfo(@Param("user")  BlogUser blogUser);

    BlogUser findUserAvatarAndUsernameById(String userId);

    List<UserCenterBlogInfo> findUserBlogInfoByUserId(List<Integer> ids);

    List<BlogUser> findUserInfo();

    List<BlogUser> findUserList(Integer offset ,Integer limit);

    Integer findUserCount();

    Integer findUserIsExits(Long userId);

    Integer updateBgUserInfo(@Param("user") BlogUser blogUser);

    Integer updateUserStatus(Integer userId);

    Integer updateUserPwd(Integer userId, String password);
}
